#ifndef GAMEFIELD_H
#define GAMEFIELD_H
#define LIGHTING_POINT_INTRO_LENGTH 20
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <sstream>

#define RADARMAP_SIZE_X 5
#define RADARMAP_SIZE_Y 5

#include "zenframe.h"
#include "Wall.h"
#include "Floor.h"
#include "Food.h"
#include "Teleporter.h"
#include "Cherry.h"
#include "SuperSfere.h"
#include "ZenFrame.h"
#include "MultiLight.h"
#include "PacmanFrame.h"
#include "Ghost.h"
#include "ZenLight.h"
#include "InitLight.h"
#include "ZenEngine.h"
#include "ZenSound.h"
#include "ZenCamera.h"

using namespace std	;

class GameFieldFrame :
	public CZenFrame
{
private:
	int m_iLevelNumber;
	int width,length;
	bool initialLighting;
	float counterLight;

	vector<CZenFrame*> frames;
public:
	vector<Ghost*> ghosts;
private:
	vector<int> row;

	Wall m_Wall;
	Floor m_Floor;
	Food m_Food;
	CTeleporter m_Teleporter;
	Cherry m_Cherry;
	SuperSfere m_SuperSfere;

	CZenLight pacInsideLight;
	CZenLight pacOverheadLight;
	CZenEngine*  zen;

public:
	bool twoPlayerMode;
	int m_numberFood;
	int m_StartX;
	int	m_StartY;
	bool wolfenstein3dMode;
	bool macieksbool;

	InitLight m_InitLight;
	PacmanFrame m_pacman;
	MultiLight m_Lights;

	vector <vector<int> > map;

	GameFieldFrame();
	~GameFieldFrame();

	int GetWidth();
	int GetLength();
	void GhostsAI();
	void SetMap();
	void GhostsMove();
	void RadarMapRender();
	void SetZenEngine(CZenEngine* zen);
	void ResetGhosts();
	
	HRESULT Init(int level, CZenKeyboard *Keyboard);
	HRESULT Render();
	void SetMapAtPosition(int a, int b);
	void SetZenSound(CZenSound * sound);
	void SetZenCamera(CZenCamera * camera);
private:
	CZenSound * m_Sound;
	CZenCamera * m_Camera;
	bool fppMode;
};


#endif
